package com.zhuzg.oauth2.domain;

import lombok.Data;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.UserDetails;

import java.util.Collection;

/**
 * 自定义的用户信息
 */
@Data
public class MyUserDetail implements UserDetails {

    private String id;

    private String username;

    private String password;

    private String test;

    private boolean isEnable;

    private  String   mobile;
    private String nickname;
    private String  email;

    private Collection<? extends GrantedAuthority> authorities;


    @Override
    public boolean isAccountNonExpired() {
        return true;
    }

    @Override
    public boolean isAccountNonLocked() {
        return true;
    }

    @Override
    public boolean isCredentialsNonExpired() {
        return true;
    }

    @Override
    public boolean isEnabled() {
        return true;
    }


}
